Skip to content

Instantly share code, notes, and snippets.

@binho
binho / caixa_modulo_seguranca_macOS.md
Last active May 21, 2024 17:27
Como instalar/reinstalar o módulo de segurança da Caixa no macOS

Bom vou falar um pouco da minha luta com o Internet Banking da Caixa.

No meu caso tive problemas após migrar o meu macbook para um novo e não conseguia instalar o módulo de segurança no novo macbook e assim sem poder usar o Internet Banking no computador.

Primeiro rodei o script sudo /usr/local/bin/warsaw/uninstall.sh do warsaw como root pra tentar começar tudo do zero mas ainda assim após tentar reinstalar não tive sucesso.

Ao analisar o script postinstall dentro do pkg notei que varios arquivos de inicialização são criados e que alguns dados ainda continuaram no meu computador como certificados e arquivos de inicialização, então tenha certeza que estes arquivos abaixo tenham sido removidos:

rm -f ~/Library/LaunchAgents/com.diebold.warsaw.user.plist
@wojteklu
wojteklu / clean_code.md
Last active May 21, 2024 17:26
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@tkrajina
tkrajina / unmarshal_interface.go
Last active May 21, 2024 17:21
Unmarshal JSON to specific interface implementation
package main
import (
"encoding/json"
"fmt"
"reflect"
)
type Something interface{}
@lukas-h
lukas-h / license-badges.md
Last active May 21, 2024 17:21
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 21, 2024 17:20
Hyperlinks in Terminal Emulators
@mrk-han
mrk-han / change-accessibility-settings-with-adb.md
Last active May 21, 2024 17:20
Enable and Disable Android Accessibility Settings from the Command Line using ADB (Font scale, talkback, color blind)

Using ADB to control Accessbility settings for easier testing with Android Emulators + Real Devices

It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.

These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.

Credit to James Nitsch for inspiring this, and for figuring out the put commands to enable these settings.

Font Scale (Font Size -- Testing Dynamic Text)

@drnic
drnic / Hello.tsx
Created June 15, 2023 23:37
In Rails apps using StimulusJS, load React components found at app/javascript/react/*/index.tsx, and make them available via Ruby helper react(name)
import React from "react";
const Hello = ({ name }: { name: string }) => <span>Hello {name}</span>;
Hello.defaultProps = { name: "World" }
export default Hello;
@joelthompson
joelthompson / README.md
Last active May 21, 2024 17:19
Vault Auth
@ohmantics
ohmantics / hb-setup.sh
Last active May 21, 2024 17:17
Homebridge in an iocage jail
DATASET=/zroot/apps
# Create the jail
iocage create -n "homebridge" -r 13.1-RELEASE dhcp=1 bpf=1 vnet=1 allow_raw_sockets="1" boot="on"
# switch to Latest
iocage exec homebridge "mkdir -p /usr/local/etc/pkg/repos"
iocage exec homebridge "echo -e 'FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/latest\" }' > /usr/local/etc/pkg/repos/FreeBSD.conf"
# Install Homebridge and dependencies
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active May 21, 2024 17:16
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes